﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using System.Data;
using System.Web;
using System.Configuration;

namespace logic
{
    public class sendSMS
    {
        public static DataSet select(string where, string orderby, int pagesize, int pageindex)
        {
            return DbHelper2000.ExecuteDataSetPageSize("*", "[dbo].[ab_send]", where, "id", orderby, pagesize, pageindex);

        }

        /// <summary>
        /// 发送短信
        /// </summary>
        /// <param name="phones">用户电话。多个电话号码用','分开，如："138********,13678945***"</param>
        /// <param name="content">发送短信正文(最多600字符)</param>
        /// <param name="time">写入时间。格式：yyyy-MM-dd HH:mm:ss</param> 
        /// <returns></returns>
        public static void send_SMS(string phones, string content)
        {
            int admin = sysAdmin.AdminID;
            string url = HttpContext.Current.Request.Url.ToString();
            DbHelper2000.ExecuteNonQuery("[dbo].[p_Ab_Send_insert]", phones, content, admin, ConfigurationManager.AppSettings["SMS_SOURCE"], url);
           
        }        

    }
}
